using System;
using System.Collections.Generic;
using System.Text;
using MacomberMap.Common.Types;
using System.Xml;

namespace MacomberMap.Common.Data
{
    /// <summary>
    /// This class holds information on a data value
    /// </summary>
    public class MM_Data_Value: MM_Serializable
    {
        #region Variable declarations
        /// <summary>The data type in which the value resides</summary>
        public MM_Data_Type DataType;

        /// <summary>The data source in which this type and value reside</summary>
        public MM_Data_Source DataSource { get { return DataType.Source; } }

        /// <summary>The name of the data value</summary>
        public String Name;

        /// <summary>The abbreviation for the data value</summary>
        public String Abbreviation;

        /// <summary>The type of data being stored in this value</summary>
        public Type Var_Type;

        /// <summary>The ID of the data point</summary>
        public int id;
        #endregion

        #region Initialization
        /// <summary>
        /// Initialize a data value
        /// </summary>
        /// <param name="BaseElement">The XML element defining the value</param>
        /// <param name="DataType">The type in which the value resides</param>
        public MM_Data_Value(XmlElement BaseElement, MM_Data_Type DataType)
            : base(BaseElement)
        {
            this.DataType = DataType;
        }
        #endregion

    }
}
